Skip to content

fix: resolve loop-local refs in task expansion#2861

Closed
Yongcheng123 wants to merge 1 commit into
go-task:mainfrom
Yongcheng123:fix/loop-ref-extra
Closed

fix: resolve loop-local refs in task expansion#2861
Yongcheng123 wants to merge 1 commit into
go-task:mainfrom
Yongcheng123:fix/loop-ref-extra

Conversation

@Yongcheng123
Copy link
Copy Markdown

Summary

  • resolve ref: values against loop-local variables during task expansion
  • add regression coverage for both default .ITEM and aliased loop vars in cmds and deps
  • preserve existing non-loop ref: behavior by keeping the extra context scoped to loop expansion

Testing

  • go test ./... -run 'TestForCmds|TestForDeps'
  • go test ./...
  • go vet ./...

Closes #2505

@trulede
Copy link
Copy Markdown
Contributor

trulede commented May 29, 2026

@Yongcheng123 why have you opened this PR for an issue that already has an open PR?

@Yongcheng123
Copy link
Copy Markdown
Author

Good catch — I missed the existing open PR for #2505. I am closing this one to avoid duplicating work. Thanks for pointing it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cannot reference loop variable using .ref

2 participants